/*
 Navicat Premium Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50732
 Source Host           : dev:3306
 Source Schema         : study

 Target Server Type    : MySQL
 Target Server Version : 50732
 File Encoding         : 65001

 Date: 16/05/2022 23:37:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for announcement
-- ----------------------------
DROP TABLE IF EXISTS `announcement`;
CREATE TABLE `announcement` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(50) DEFAULT NULL COMMENT '标题',
  `content` text COMMENT '内容',
  `update_time` datetime DEFAULT NULL COMMENT '最近更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of announcement
-- ----------------------------
BEGIN;
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (1, NULL, NULL, '2022-03-12 13:37:06', '2022-03-12 13:37:06');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (2, NULL, NULL, '2022-03-12 13:37:27', '2022-03-12 13:37:27');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (3, NULL, NULL, '2022-03-12 13:38:59', '2022-03-12 13:38:59');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (4, NULL, NULL, '2022-03-12 13:42:56', '2022-03-12 13:42:56');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (5, NULL, NULL, '2022-03-12 15:04:33', '2022-03-12 15:04:33');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (6, NULL, NULL, '2022-03-12 15:06:10', '2022-03-12 15:06:10');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (7, NULL, NULL, '2022-03-12 15:06:11', '2022-03-12 15:06:11');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (8, NULL, NULL, '2022-03-12 15:06:11', '2022-03-12 15:06:11');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (9, NULL, NULL, '2022-03-12 15:18:45', '2022-03-12 15:18:45');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (10, NULL, NULL, '2022-03-12 15:30:44', '2022-03-12 15:30:44');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (11, NULL, NULL, '2022-04-10 15:40:36', '2022-04-10 15:40:36');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (12, NULL, NULL, '2022-04-10 15:40:52', '2022-04-10 15:40:52');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (13, NULL, NULL, '2022-04-10 15:41:01', '2022-04-10 15:41:01');
INSERT INTO `announcement` (`id`, `title`, `content`, `update_time`, `create_time`) VALUES (14, '请问请问', '<p><img src=\"/download/13e53ed0-7f6f-4641-bc9f-3206fde89844test.jpeg\" alt=\"test.jpeg\"></p><p>打好基础</p>', '2022-04-10 15:42:25', '2022-04-10 15:42:25');
COMMIT;

-- ----------------------------
-- Table structure for answer
-- ----------------------------
DROP TABLE IF EXISTS `answer`;
CREATE TABLE `answer` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(50) DEFAULT NULL COMMENT '问题标题',
  `student_id` bigint(20) DEFAULT NULL COMMENT '学生id',
  `content` text COMMENT '问题内容',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `teacher_id` bigint(20) DEFAULT NULL COMMENT '老师id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of answer
-- ----------------------------
BEGIN;
INSERT INTO `answer` (`id`, `title`, `student_id`, `content`, `update_time`, `create_time`, `teacher_id`) VALUES (8, '士大夫', 30, '士大夫', '2022-03-19 15:59:57', '2022-03-19 15:59:57', 30);
COMMIT;

-- ----------------------------
-- Table structure for answer_sheet
-- ----------------------------
DROP TABLE IF EXISTS `answer_sheet`;
CREATE TABLE `answer_sheet` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `student_id` bigint(20) DEFAULT NULL COMMENT '学生id',
  `option` varchar(255) DEFAULT NULL COMMENT '学生答案',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `topic_id` bigint(20) DEFAULT NULL COMMENT '题目id',
  `job_id` bigint(20) DEFAULT NULL COMMENT '作业id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of answer_sheet
-- ----------------------------
BEGIN;
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (1, 30, 'C', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (2, 30, 'C', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (3, 30, 'C', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (4, 30, 'A', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (5, 30, 'B', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (6, 30, 'C', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (7, 30, 'D', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (8, 30, 'B', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (9, 30, 'C', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (10, 30, 'D', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (11, 30, 'C', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (12, 30, 'D', NULL, NULL, 3, 12);
INSERT INTO `answer_sheet` (`id`, `student_id`, `option`, `update_time`, `create_time`, `topic_id`, `job_id`) VALUES (13, 30, 'A', NULL, NULL, 3, 12);
COMMIT;

-- ----------------------------
-- Table structure for chapter
-- ----------------------------
DROP TABLE IF EXISTS `chapter`;
CREATE TABLE `chapter` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `name` varchar(20) DEFAULT NULL COMMENT '章节名',
  `video` varchar(255) DEFAULT NULL COMMENT '视频地址',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `course_id` bigint(20) DEFAULT NULL COMMENT '课程id',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COMMENT='章节';

-- ----------------------------
-- Records of chapter
-- ----------------------------
BEGIN;
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (1, '123', '', NULL, NULL, NULL, 23);
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (2, 'liupeng', '', NULL, NULL, NULL, 12);
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (3, '123', '', NULL, NULL, NULL, 23);
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (4, 'liupeng', '', NULL, NULL, NULL, 12);
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (5, '123', '', NULL, NULL, NULL, 23);
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (6, 'rrffd', '', NULL, NULL, NULL, 12);
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (17, '213', '/download/f29c1728-43ed-4a6b-818f-dfce352a63c55ddcc092-aa56-4a43-b076-20d263c7eb2403__________SparkSql_2.0_ (1).docx', NULL, NULL, 6, 23);
INSERT INTO `chapter` (`id`, `name`, `video`, `create_time`, `update_time`, `course_id`, `sort`) VALUES (18, '测试章节', '/download2/c8c0fbd4-0356-4fc9-937f-1af126542261mov_bbb.mp4', NULL, NULL, 4, 1);
COMMIT;

-- ----------------------------
-- Table structure for check_in_task
-- ----------------------------
DROP TABLE IF EXISTS `check_in_task`;
CREATE TABLE `check_in_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) DEFAULT NULL COMMENT '任务名称',
  `check_in_time` datetime DEFAULT NULL COMMENT '签到时间',
  `course_id` bigint(20) DEFAULT NULL COMMENT '课程id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='签到任务';

-- ----------------------------
-- Records of check_in_task
-- ----------------------------
BEGIN;
INSERT INTO `check_in_task` (`id`, `name`, `check_in_time`, `course_id`) VALUES (1, '测试章节', '2022-05-16 08:00:00', 5);
INSERT INTO `check_in_task` (`id`, `name`, `check_in_time`, `course_id`) VALUES (2, '21', '2203-04-10 08:00:00', 4);
COMMIT;

-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) DEFAULT NULL COMMENT '课程名',
  `teacher_id` bigint(20) DEFAULT NULL COMMENT '课程老师id',
  `introduce` text COMMENT '课程介绍',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `material` text COMMENT '资料',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of course
-- ----------------------------
BEGIN;
INSERT INTO `course` (`id`, `name`, `teacher_id`, `introduce`, `create_time`, `update_time`, `material`) VALUES (4, '五七二', 30, ' 委屈 ', '2022-03-19 16:04:55', '2022-05-14 15:45:01', NULL);
INSERT INTO `course` (`id`, `name`, `teacher_id`, `introduce`, `create_time`, `update_time`, `material`) VALUES (5, 'liupeng', 30, 'qweq', '2022-04-10 13:44:08', '2022-04-10 13:44:08', NULL);
INSERT INTO `course` (`id`, `name`, `teacher_id`, `introduce`, `create_time`, `update_time`, `material`) VALUES (6, 'liupeng', 30, '213', '2022-04-10 15:16:48', '2022-04-10 15:16:48', NULL);
COMMIT;

-- ----------------------------
-- Table structure for course_materials
-- ----------------------------
DROP TABLE IF EXISTS `course_materials`;
CREATE TABLE `course_materials` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `src` varchar(255) DEFAULT NULL COMMENT 'url路径',
  `course_id` bigint(20) DEFAULT NULL COMMENT '课程id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='课程资料信息';

-- ----------------------------
-- Records of course_materials
-- ----------------------------
BEGIN;
INSERT INTO `course_materials` (`id`, `title`, `src`, `course_id`) VALUES (1, '【高清电子版】Scala编程实战.pdf', '/download/343003e9-954e-4b75-8843-8c1073077e57【高清电子版】Scala编程实战.pdf', 6);
INSERT INTO `course_materials` (`id`, `title`, `src`, `course_id`) VALUES (2, '2021年1H 绩效评估表.doc', '/download2/44db878e-9dca-48b1-b532-86d56b83b2b22021年1H 绩效评估表.doc', 4);
INSERT INTO `course_materials` (`id`, `title`, `src`, `course_id`) VALUES (3, '06_尚硅谷大数据技术之Spark性能调优与故障处理（1.1）.doc', '/download2/ed03c855-ce3d-4260-9e6a-d91d2b60011b06_尚硅谷大数据技术之Spark性能调优与故障处理（1.1）.doc', 4);
COMMIT;

-- ----------------------------
-- Table structure for course_order
-- ----------------------------
DROP TABLE IF EXISTS `course_order`;
CREATE TABLE `course_order` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `student_id` bigint(20) DEFAULT NULL COMMENT '学生id',
  `course_id` bigint(20) NOT NULL COMMENT '课程id',
  `update_time` datetime DEFAULT NULL COMMENT '最近更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of course_order
-- ----------------------------
BEGIN;
INSERT INTO `course_order` (`id`, `student_id`, `course_id`, `update_time`, `create_time`) VALUES (7, 30, 2, NULL, NULL);
INSERT INTO `course_order` (`id`, `student_id`, `course_id`, `update_time`, `create_time`) VALUES (11, 30, 4, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for job
-- ----------------------------
DROP TABLE IF EXISTS `job`;
CREATE TABLE `job` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(50) DEFAULT NULL COMMENT '标题',
  `teacher_id` bigint(20) DEFAULT NULL COMMENT '布置作业老师',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间 ',
  `update_time` datetime DEFAULT NULL COMMENT '最近更新时间',
  `course_id` bigint(20) DEFAULT NULL COMMENT '课程id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of job
-- ----------------------------
BEGIN;
INSERT INTO `job` (`id`, `title`, `teacher_id`, `create_time`, `update_time`, `course_id`) VALUES (12, '阿达', 30, '2022-03-17 06:47:30', '2022-03-19 16:29:21', 4);
COMMIT;

-- ----------------------------
-- Table structure for job_tpoic
-- ----------------------------
DROP TABLE IF EXISTS `job_tpoic`;
CREATE TABLE `job_tpoic` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `job_id` bigint(20) DEFAULT NULL COMMENT '作业id',
  `topic_id` bigint(20) DEFAULT NULL COMMENT '题目id',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of job_tpoic
-- ----------------------------
BEGIN;
INSERT INTO `job_tpoic` (`id`, `job_id`, `topic_id`, `update_time`, `create_time`) VALUES (9, 12, 3, '2022-03-19 16:29:21', '2022-03-19 16:29:21');
COMMIT;

-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(20) DEFAULT NULL COMMENT '菜单名',
  `parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单id',
  `url` varchar(255) DEFAULT NULL COMMENT '菜单url',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of menu
-- ----------------------------
BEGIN;
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (1, '数据管理', -1, '', '2022-03-01 22:18:43', '2022-03-01 22:18:45');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (2, '用户管理', 1, '/index/user', NULL, NULL);
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (3, '菜单管理', 1, '/index/menu', NULL, NULL);
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (4, '公告管理', 1, '/index/announcement', NULL, NULL);
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (6, '教学平台', -1, NULL, NULL, NULL);
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (7, '题目管理', 6, '/index/topic', NULL, '2022-03-15 03:06:39');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (8, '课程管理', 6, '/index/course', NULL, '2022-03-15 03:07:01');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (9, '作业管理', 6, '/index/job', NULL, '2022-03-15 03:07:16');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (10, '在线解答', 6, '/index/answer/list', NULL, '2022-03-15 03:07:46');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (17, '角色管理', 1, '/index/role', '2022-03-12 16:36:12', '2022-03-12 16:46:05');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (18, '学习天地', -1, '', '2022-03-15 03:02:00', '2022-03-15 03:02:00');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (19, '课程订阅', 18, '/index/course/subscribe', '2022-03-15 03:03:54', '2022-03-15 03:03:54');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (20, '作业练习', 18, '/index/job/list', '2022-03-15 03:04:51', '2022-03-15 03:04:51');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (21, '在线答疑', 18, '/index/answer', '2022-03-15 03:05:39', '2022-03-15 03:05:39');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (22, '我的课程', 18, '/index/course/myCourseList', '2022-05-08 20:28:42', '2022-05-08 20:28:42');
INSERT INTO `menu` (`id`, `name`, `parent_id`, `url`, `create_time`, `update_time`) VALUES (23, '签到任务', 6, '/index/checkInTask', '2022-05-14 19:32:23', '2022-05-14 19:32:23');
COMMIT;

-- ----------------------------
-- Table structure for menu_role
-- ----------------------------
DROP TABLE IF EXISTS `menu_role`;
CREATE TABLE `menu_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单id',
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of menu_role
-- ----------------------------
BEGIN;
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (46, 2, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (47, 2, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (52, 6, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (53, 6, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (54, 7, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (55, 7, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (56, 8, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (57, 8, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (58, 4, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (59, 4, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (60, 17, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (61, 17, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (62, 10, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (63, 10, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (64, 9, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (65, 9, 2);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (67, 2, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (69, 4, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (70, 6, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (71, 7, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (72, 8, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (73, 9, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (74, 10, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (75, 17, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (77, 2, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (79, 4, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (80, 6, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (81, 7, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (82, 8, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (83, 9, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (84, 10, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (85, 17, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (87, 2, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (88, 3, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (89, 4, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (90, 6, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (91, 7, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (92, 8, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (93, 9, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (94, 10, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (95, 17, 3);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (96, 1, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (97, 2, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (98, 3, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (99, 4, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (100, 6, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (101, 7, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (102, 8, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (103, 9, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (104, 10, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (105, 17, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (106, 18, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (107, 19, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (108, 20, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (109, 21, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (110, 22, 1);
INSERT INTO `menu_role` (`id`, `menu_id`, `role_id`) VALUES (111, 23, 2);
COMMIT;

-- ----------------------------
-- Table structure for reply
-- ----------------------------
DROP TABLE IF EXISTS `reply`;
CREATE TABLE `reply` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `answer_id` bigint(20) DEFAULT NULL COMMENT '学生问题id',
  `content` text COMMENT '回答内容',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of reply
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(20) NOT NULL COMMENT '名字',
  `role_key` varchar(10) DEFAULT NULL COMMENT '角色key',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `teacher_id` bigint(20) DEFAULT NULL COMMENT '老师id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='角色';

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` (`id`, `name`, `role_key`, `update_time`, `create_time`, `teacher_id`) VALUES (1, '学生', 'student', '2022-02-26 14:22:40', '2022-02-26 14:22:42', NULL);
INSERT INTO `role` (`id`, `name`, `role_key`, `update_time`, `create_time`, `teacher_id`) VALUES (2, '老师', 'teacher', '2022-02-26 14:23:22', '2022-02-26 14:23:24', NULL);
INSERT INTO `role` (`id`, `name`, `role_key`, `update_time`, `create_time`, `teacher_id`) VALUES (3, '管理员', NULL, '2022-03-12 16:57:51', '2022-03-12 16:57:51', NULL);
COMMIT;

-- ----------------------------
-- Table structure for student_check_in_log
-- ----------------------------
DROP TABLE IF EXISTS `student_check_in_log`;
CREATE TABLE `student_check_in_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `student_id` bigint(20) DEFAULT NULL COMMENT '学生id',
  `check_in_task_id` bigint(20) DEFAULT NULL COMMENT '签到任务id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间 ',
  `update_time` datetime DEFAULT NULL COMMENT '最近更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学生签到记录表';

-- ----------------------------
-- Records of student_check_in_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for topic
-- ----------------------------
DROP TABLE IF EXISTS `topic`;
CREATE TABLE `topic` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(50) DEFAULT NULL COMMENT '题目',
  `content` text COMMENT '题目内容',
  `right_answers` varchar(50) DEFAULT NULL COMMENT '正确答案',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `option_A` varchar(255) DEFAULT NULL COMMENT '选项A',
  `option_B` varchar(255) DEFAULT NULL COMMENT '选项B',
  `option_C` varchar(255) DEFAULT NULL COMMENT '选项C',
  `option_D` varchar(255) DEFAULT NULL COMMENT '选项D',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of topic
-- ----------------------------
BEGIN;
INSERT INTO `topic` (`id`, `title`, `content`, `right_answers`, `update_time`, `create_time`, `option_A`, `option_B`, `option_C`, `option_D`) VALUES (3, '1231', '<img src=\"/download/b603eef3-6bb9-41f3-9afa-e085ebf43cc1test.jpeg\" alt=\"file\"><img src=\"http://dev:9000/test/R-C.jpg\" alt=\"file\">123123', 'D', '2022-04-10 09:39:59', '2022-03-17 06:47:11', '1', '2', '4', '6');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(40) NOT NULL COMMENT '用户名',
  `password` varchar(255) NOT NULL COMMENT '密码',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `nickname` varchar(40) DEFAULT NULL COMMENT '昵称',
  `phone_number` varchar(19) DEFAULT NULL COMMENT '手机号',
  `mail` varchar(20) DEFAULT NULL COMMENT '邮箱',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `user_username_uindex` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `username`, `password`, `create_time`, `update_time`, `nickname`, `phone_number`, `mail`) VALUES (30, '2', '$2a$10$k2IfqTIz1CEnSX2J0OKHWOgllw/K3wpAOeLUBPBgWg4ap8EKGMpZS', '2022-03-06 01:42:46', '2022-03-06 01:42:49', 'test', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` bigint(20) DEFAULT NULL COMMENT '学生id',
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of user_role
-- ----------------------------
BEGIN;
INSERT INTO `user_role` (`id`, `user_id`, `role_id`) VALUES (37, 30, 1);
INSERT INTO `user_role` (`id`, `user_id`, `role_id`) VALUES (38, 30, 2);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
